<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
		<link rel="shortcut icon" type="image/x-icon" href="/static/img/indexImg/applogo.png">
        <title>矿工家族</title>
        <script>
			function GetRequest() {
				var url = location.hash;
				var theRequest = new Object();
				if (url.indexOf("?") != -1) {
					var str = url.substr(url.indexOf("?")+1);
					strs = str.split("&");
					for(var i = 0; i < strs.length; i ++) {
						theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
					}
				}
				return theRequest;
				//console.log(theRequest)
			}
			var param = GetRequest()
			function entry (e){
				//console.log(location.hash)
				if(!/^#\/pages\/login\/register/im.test(location.hash) && !/^(localhost|192\.168)/.test(location.host)){
					var code = param.code
					var url = '/pages/login/register'
					if(code){
						url += '?code=' + code
					}
					uni.navigateTo({
						url: url
					})
				}
			}
			window.addEventListener('DOMContentLoaded', function(){
				if(window && !window.plus){
					entry()
					var _wr = function(type) {
						var orig = history[type];
						return function() {
							var rv = orig.apply(this, arguments);
							var e = new Event(type);
							e.arguments = arguments;
							window.dispatchEvent(e);
							return rv;
						};
					};
					history.pushState = _wr('pushState');
					history.replaceState = _wr('replaceState');
					window.addEventListener('replaceState', entry);
					window.addEventListener('pushState', entry);
				}
			}, false)
            document.addEventListener('DOMContentLoaded', function() {
                document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'
            })
        </script>
        <link rel="stylesheet" href="<%= BASE_URL %>static/index.css" />
    </head>
    <body>
        <noscript>
            <strong>Please enable JavaScript to continue.</strong>
        </noscript>
        <div id="app"></div>
        <!-- built files will be auto injected -->
    </body>
</html>